package com.tacademy.lbs.server.model;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import com.google.appengine.api.datastore.Key;

@PersistenceCapable
public class Place {
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)     
	private Key key;
	
	@Persistent
	private Date date;
	
	@Persistent
	private String location;
	
	@Persistent
	private String id;
	
	@Persistent
	private String user;
	
	@Persistent
	private int count;
	
	public void setKey(Key key) {
		this.key = key;
	}
	public Key getKey() {
		return key;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	public String getLocation() {
		return location;
	}
	public void setLocation(String location) {
		this.location = location;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getUser() {
		return user;
	}
	public void setUser(String user) {
		this.user = user;
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
	public String toString() {
		StringBuilder builder = new StringBuilder(super.toString());
		builder.append("\ndate:").append(date);
		builder.append("\nlocation:").append(location);
		builder.append("\nid:").append(id);
		builder.append("\nuser:").append(user);
		
		return builder.toString();
	}
}